package priv.dk.springboot.exception;
import static priv.dk.springboot.util.CommonUtil.BIZ_ERROR;

/**
 * 自定义业务异常
 */
public class BusinessException extends RuntimeException {
    private final int code;

    public int getCode() {
        return code;
    }

    public BusinessException(String msg) {
        super(msg);
        this.code = BIZ_ERROR;
    }

    public BusinessException(int code, String msg) {
        super(msg);
        this.code = code;
    }
}